<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php 
	if( !isset($_COOKIE["username"]) ){
		echo "<script>window.location.href='login.php'</script>";
	}else{
		setcookie("username", $_COOKIE["username"],time() + 900);
	}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>SCANNER FILE VIEW</title>
<link href="css/template.css" rel="stylesheet" type="text/css" />
<link href="css/test/SMSMessage.css" rel="stylesheet" type="text/css" />
<script src="js/droplinemenu.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript">
//build menu with DIV ID="myslidemenu" on page:
droplinemenu.buildmenu("nav")
</script>

<link href="css/ui-lightness/jquery-ui-1.9.2.custom.css" rel="stylesheet">
<script src="js/jquery-1.8.3.js"></script>
<script src="js/jquery-ui-1.9.2.custom.js"></script>



<script>



</script>
</head>

<body>

	<?php
			$ini_array = parse_ini_file("config/config.ini");
			//echo $ini_array["host"];
			//$conn = @mysqli_connect($ini_array["host"], $ini_array["username"], $ini_array["password"], $ini_array["db_name"]) or die("cann't connect the mysql db");
			//mysqli_set_charset($conn, "utf8");
			ini_set('default_charset', "UTF-8");
			$scannerFile1 = "";
			$scannerFile2 = "";
			$scannerFile3 = "";
			$scannerFile4 = "";
			$scannerFile5 = "";
			
			if( isset($_GET["scannerFile1"] )){
				$scannerFile1 = str_replace("_", "/" ,$_GET["scannerFile1"]);
			
			}
			if( isset($_GET["scannerFile2"] )){
				$scannerFile2 = $_GET["scannerFile2"];
			}
			if( isset($_GET["scannerFile3"] )){
				$scannerFile3 = $_GET["scannerFile3"];
			}
			if( isset($_GET["scannerFile4"] )){
				$scannerFile4 = $_GET["scannerFile4"];
			}
			if( isset($_GET["scannerFile5"] )){
				$scannerFile5 = $_GET["scannerFile5"];
			}
			//if( isset($_GET["appointmentNo"]) ){
			//	$getScannerFileSql = "select scanner_file_1, scanner_file_2, scanner_file_3, scanner_file_4, scanner_file_5 from appointment where appointment_no=".$_GET["appointmentNo"];
			//	$scannerFileResult = mysqli_query($conn, $getScannerFileSql);
			//if( $row = mysqli_fetch_array($scannerFileResult) ){
			//		$scannerFile1 = $row["scanner_file_1"];
			//		$scannerFile2 = $row["scanner_file_2"];
			//		$scannerFile3 = $row["scanner_file_3"];
			//		$scannerFile4 = $row["scanner_file_4"];
			//		$scannerFile5 = $row["scanner_file_5"];
			//	}
			//}
	?>
	<div>
		<table  style="margin:10px auto;text-align:center;">
			<tr>
				<td width="20%" style="text-align:right;"><img width="300" height="300" src="<?php echo $scannerFile1 ?>" alt="scanner_file_1" style="border:solid 1px black"/></td>
				<td width="20%" style="text-align:center;"><img width="300" height="300" src="<?php echo $scannerFile2 ?>" alt="scanner_file_2" style="border:solid 1px black"/></td>
				<td width="20%" style="text-align:left"><img width="300" height="300" src="<?php echo $scannerFile3 ?>" alt="scanner_file_3" style="border:solid 1px black"/></td>
				<td width="20%" style="text-align:right;"><img width="300" height="300" src="<?php echo $scannerFile4 ?>" alt="scanner_file_4" style="border:solid 1px black"/></td>
				<td width="20%" style="text-align:right;"><img width="300" height="300" src="<?php echo $scannerFile5 ?>" alt="scanner_file_5" style="border:solid 1px black"/></td>
			</tr>
		</table>
	</div>
</body>
</html>
